package entity.sparemanage;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 备件类型
 * </p>
 *
 * @author beisheng
 * @since 2023-05-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SpareTypes implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "sp_id", type = IdType.AUTO)
    private Integer spId;

    /**
     * 备件类型名称
     */
    private String spTypename;

    //备件类型编码
    private String spTypecode;
    /**
     * 父ID
     */
    private Integer parentId;

    /**
     * 备件状态(2禁用1启用)
     */
    private Integer spTypestatus;

    /**
     * 备注
     */
    private String spRemark;

    /**
     * 创建人
     */
    private String founder;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 删除时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    /**
     * 删除标识(0.未删除,1.已删除)
     */
    private Integer deleteFlag;

    @TableField(exist = false)
    private List<SpareTypes> children;
}
